<?php
/**
 * Utility functions
 */
function is_element_empty($element) {
    $element = trim($element);
    return !empty($element);
}

// Tell WordPress to use searchform.php from the templates/ directory
function apollo_get_search_form($form) {
    $form = '';
    locate_template('/templates/searchform.php', true, false);
    return $form;
}
add_filter('get_search_form', 'apollo_get_search_form');

/**
 * Adds support for a theme option.
 */
if ( !function_exists( 'optionsframework_init' ) ) {
	define( 'OPTIONS_FRAMEWORK_DIRECTORY', get_template_directory_uri() . '/inc/admin/assets/' );
    
	//require_once( APOLLO_ADMIN_LIB_DIR. '/theme-options/options-framework.php' );
}

/* THEME OPTIONS FRAMEWORK - HANDLE TEMPLATE */
//require_once APOLLO_INCLUDES_DIR. '/apollo-theme-options-function.php';

/* WIDGETS */
require_once APOLLO_INCLUDES_DIR. '/apollo-widgets-function.php';

/* SHORTCODES */
require_once APOLLO_INCLUDES_DIR. '/class-apollo-shortcode.php';



require_once locate_template('/themeoptions/options/virtue_extension.php'); // Options framework extension
require_once locate_template('/themeoptions/framework.php');        // Options framework
require_once locate_template('/themeoptions/options.php');     		// Options framework